package cn.itsource.pet.controller;

import cn.itsource.basic.util.AjaxResult;
import cn.itsource.pet.pojo.domain.PetType;
import cn.itsource.pet.service.IPetTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 宠物类型控制器
 */
@RestController
@RequestMapping("/petType")
@Api(tags = "宠物类型管理", description = "宠物类型操作接口")
public class PetTypeController {

    @Autowired
    private IPetTypeService petTypeService;
    
    /**
     * 查询所有
     */
    @GetMapping("/findPetTypeList")
    @ApiOperation(value = "查询所有宠物类型信息", notes = "查询所有宠物类型信息，get请求")
    public AjaxResult findPetTypeList() {
        List<PetType> petTypeList = petTypeService.findPetTypeList();

        return AjaxResult.createSuccess(petTypeList);
    }

}
